<%-- 
    Document   : catalogoBanco
    Created on : 12/11/2014, 07:42:40 PM
    Author     : jaixacra
--%>

<%@page contentType="text/html" pageEncoding="windows-1252"%>
<!DOCTYPE html>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<f:loadBundle var="msgs" basename="nueva.esperanza.web.resources.messages" />
<html>
    <head>
        <link rel="stylesheet" href="../css/sat.css" media="screen"/>
        <link rel="stylesheet" href="../css/satVarios.css" media="screen"/>
        <script type="text/javascript" language="JavaScript" src="../js/js.js"></script>
        <title>catalogoBanco</title>
    </head>
    <body onclick="clickRigth();">
        <f:view>
            <jsp:include page="../template/header.jsp"/>
            <table class="skin_chooser" cellpadding="0" cellspacing="0" border="0">
                <tbody>
                    <tr>
                        <td>
                            <strong>
                                <h:outputText styleClass="texto_3d" value="Catalogo Banco"/>
                            </strong>
                        </td>
                    </tr>
                </tbody>
            </table>
    <center>
        <a4j:form id="frmChequera" style="left:5px; right:5px; top:90px; position:absolute; background-color:transparent;width:100%">
                    <a4j:keepAlive beanName="catalogoBancoUI"/>
                    <a4j:status style="width:16px;height:16px;">
                        <f:facet name="start">
                            <h:graphicImage value="../images/ajax-loader.gif" alt="ai"/>
                        </f:facet>
                    </a4j:status>
                    
        <rich:panel id="panelBusqueda" header="Resultado de la Busqueda" style=" background-color:transparent; width: 40%">
            <rich:messages  errorLabelClass="error" infoLabelClass="info" warnLabelClass="warning" id="mensajes" ajaxRendered="false"/>
                    <rich:panel bodyClass="rich-laguna-panel-no-header">
                        <div align="right">
                        <a4j:commandButton style="height:25px;width:25px" id="editIMG" reRender="pnlNuevo"                                                
                                           oncomplete="#{rich:component('pnlNuevo')}.show();"
                                           image="../images/iconoAdd.png" title="Agregar Nuevo Banco"
                                           >


                        </a4j:commandButton>
                    </div>
                        
                        <center>
                            <div style="width:100%;overflow-x:auto">
                                <rich:dataTable 
                                    style="width: 50%"
                                    value="#"
                                    onRowMouseOver="this.style.backgroundColor='#e3f0ff'"
                                    onRowMouseOut="this.style.backgroundColor='#FFFFFF'"
                                    width="100"
                                    var="list">
                                    <rich:column id="expediente" width="40px" >
                                        <f:facet name="header" >
                                            <h:outputText value="Descripcion Bancos" />
                                        </f:facet>
                                        <h:outputText value="#" style="width: 20%"/>
                                    </rich:column>
                                    <rich:column id="action1" width="20px">
                                        <f:facet name="header" >
                                            <h:outputText value="Opcion" />
                                        </f:facet>
                                        <a4j:commandButton 
                                            style="height:25px;width:25px" id="editIMG"                                 
                                            image="/images/iconoEdit.png"
                                            >  
                                            <rich:toolTip for="editIMG">Editar Bancos!!!.</rich:toolTip>  
                                            <a4j:support event="oncomplete" reRender="mdpConfirmacion" oncomplete="Richfaces.showModalPanel('mdpConfirmacion');"/>
                                        </a4j:commandButton>
                                    </rich:column>
                                </rich:dataTable>
                            </div>
                        </center>
                         </rich:panel>
                </rich:panel> 
                    </a4j:form>
    </center>
                            
        <rich:modalPanel id="pnlNuevo" width="450" height="170" autosized="true">
            <f:facet name="header">
                <table cellpadding="0" cellspacing="0" border="0" align="left">
                    <tbody>
                        <tr>
                            <td><strong> <h:outputText
                                        value="Panel de Ingreso" />
                                </strong></td>
                        </tr>
                    </tbody>
                </table>
            </f:facet>
            <rich:messages  errorLabelClass="error" id="mensajes3" infoLabelClass="info" />
            <a4j:form>
                <p />
                <p />
                <rich:panel id="pnlRegistroNuevo" header="Registro Bancos">

                    <div align="center">

                        <table style="FONT-SIZE: 12px;">

                            <tr>
                                <td><h:outputText value="Nombre Nuevo Banco" /></td>
                                <td><a4j:region>
                                        <h:inputText id="txtNombreNuevo" maxlength="100"
                                                     value="#{catalogoBancoUI.catalogo.nombre}">

                                        </h:inputText>
                                    </a4j:region></td>
                            </tr>
                        </table>
                    </div>
                </rich:panel>
                <div align="center">
                    <a4j:commandButton value="Guardar"
                                       styleClass="button-aceptar"
                                       action="#{catalogoBancoUI.enviarParametroBanco}"
                                       oncomplete="#{rich:component('pnlNuevo')}.hide();"
                                       reRender="pnlNuevo, mensajes" />
                    
                    <a4j:commandButton value="Cancelar" 
                                       styleClass="button-cancelar"
                                       oncomplete="Richfaces.hideModalPanel('pnlNuevo');"></a4j:commandButton>
                </div>

            </a4j:form>
        </rich:modalPanel>

        </f:view>
    </body>
</html>
